﻿//----------------------------------------------------------------
// Desc: 
// Edit: ShowLong, http://blog.csdn.net/showlong
//
// Date Created: 2009-10-15
//
// Update Date :            
//
// Copyright (c) Fuel4D (http://www.fuel4d.com), All rights reserved.
//
//----------------------------------------------------------------
#pragma once


class FAPI FUI_Check : public FUI_Button
{
    FUI_DECLARE_CLASS(FUI_Check)

public:
    FUI_Check(EF_UI_WIDGET_TYPE t = eUWT_Check);
    virtual void Render(EF_UI_RENDER_LAYER layer);
    virtual bool OnLButtonUp(funit nX, funit nY);

    // 设置选中状态
    virtual void SetCheck(bool bCheck){ pCheckData->SetSelected(bCheck); }
    // 是否选中的
    virtual bool IsChecked(){ return pCheckData->IsSelected(); }

protected:
    virtual void InitUIData(FUI_Object* father, fuWidgetBase* pData, FUI_Layout* layout);

protected:
    fuWidgetCheck* pCheckData;  // 控件数据地址
};